Skip to content

feat: add schema tests for core clinical models#1302

Open
Hitendrasinhdata7 wants to merge 1 commit intotuva-health:mainfrom
Hitendrasinhdata7:feat/add-schema-tests-claims-models
Open

feat: add schema tests for core clinical models#1302
Hitendrasinhdata7 wants to merge 1 commit intotuva-health:mainfrom
Hitendrasinhdata7:feat/add-schema-tests-claims-models

Conversation

@Hitendrasinhdata7
Copy link
Copy Markdown

What this PR does

Adds schema.yml with data quality tests for core clinical models
that were previously untested.

Models covered

  • core__patient: not_null, unique, accepted_values for sex/death_flag
  • core__encounter: not_null, unique, accepted_values for encounter_type
  • core__condition: not_null, unique, accepted_values for condition_type
  • core__procedure: not_null, unique, accepted_values for procedure_type
  • core__medication: not_null, unique on primary key
  • core__lab_result: not_null, unique on primary key
  • core__observation: not_null, unique on primary key
  • core__immunization: not_null, unique on primary key
  • core__appointment: not_null, unique on primary key

Why

These models had no schema tests. Adding tests ensures
data quality and catches regressions early.

Related

Follows the same pattern as PR #1301

@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 5, 2026

Deploy Preview for thetuvaproject canceled.

Name Link
🔨 Latest commit 7caa765
🔍 Latest deploy log https://app.netlify.com/projects/thetuvaproject/deploys/69d2687df3158c00080f122f

@KetanP1618
Copy link
Copy Markdown

Looks good. Adding schema tests for core models improves data quality and helps catch issues early. Follows the same pattern as previous PRs and makes the models more reliable.

@amartinson193
Copy link
Copy Markdown
Collaborator

A YAML file for core models already exists here: https://github.com/tuva-health/tuva/blob/main/models/core/core_models.yml#L2136

Either update this PR to add additional tests to that file or close this PR please.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 👀 Ready for Review

Development

Successfully merging this pull request may close these issues.

3 participants